<template>
  <div>
    <div class="shop_frame">
      <div class="shop_img">
        <img src="../assets/Snipaste_2021-04-21_16-48-14.png" alt="">
      </div>
      <div class="shop_message">
        <h2>码堂盖浇饭(天河区)</h2>
        <div class="distance">
          <span>新店尝鲜</span>
          <p>30分钟 392m</p>
        </div>
        <div class="condition">起送￥10 免配送费 <del>￥3.3</del></div>
        <div class="public_praise">"农家一碗香盖浇饭性价比很高"</div>
        <div v-if="islist" class="discounts">
          <div class="discounts_condition">20减4 <span> | </span> 35减8</div>
          <div class="firs">首次光临减4</div>
        </div>
        <div v-else class="money">
          <span>￥28</span>
          <div class="add">+</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    islist: {
      type: Boolean,
      default: true
    }
  },
  data() {
    return {

    }
  }
}
</script>
<style lang="scss" scoped>

 .shop_frame {
    width: 100%;
    padding: 10px;
    display: flex;
    height: 160px;
    background-color: #fff;
    .shop_img {
      flex: 1;
      margin-right: 10px;
      img {
        height: 100%;
        width: 100%;
      }
    }
    .shop_message {
      flex: 2;
      margin-top: 10px;
      h2 {
        font-size: 16px;
        font-weight: 700;
      }
      .distance {
        display: flex;
        margin: 10px 0;
        justify-content: space-between;
        font-size: 12px;
        span {
          display: block;
          background-color: #f8f3dd;
          padding: 3px;
          color: #e09b47;
          border-radius: 3px;
        }
        p {
          color: #949494;
        }
      }
      .condition {
        color: #949494;
        font-size: 12px;
      }
      .public_praise {
        margin-top: 10px;
        padding: 3px;
        font-size: 12px;
        color: #e09b47;
        background-color: #f8f3dd;
        border-radius: 3px;
      }
    }
    .discounts {
      display: flex;
      margin-top: 10px;
      .discounts_condition,.firs {
        padding: 3px;
        border: 1px solid #ccc;
        font-size: 12px;
        color: #d0877b;
        margin-right: 5px;
        border-radius: 5px;
        span {
          color: #ccc;
          line-height: 16px;
        }
      }
    }
  }

  .money{
    margin-top: 15px;
    font-size: 14px;
    color: #f50c0c;
    display: flex;
    justify-content: space-between;
    .add{
      width: 20px;
      height: 20px;
      border-radius: 50%;
      color: #fff;
      background-color: #f50c0c;
      text-align: center;
      font-size: 18px;
      font-weight: 700;
    }
  }

</style>
